Integrand size = 43, antiderivative size = 269 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\frac {2 \left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 a^3 d}-\frac {2 \left (3 A b^3-a^3 B-3 a b^2 B+a^2 b (A+3 C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 a^4 d}+\frac {2 b^2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^4 (a+b) d}+\frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}} \]
[Out]
Time = 1.01 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {4189, 4191, 3934, 2884, 3872, 3856, 2719, 2720} \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\frac {2 b^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \left (A b^2-a (b B-a C)\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^4 d (a+b)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 (3 A+5 C)-5 a b B+5 A b^2\right )}{5 a^3 d}-\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \left (a^3 (-B)+a^2 b (A+3 C)-3 a b^2 B+3 A b^3\right )}{3 a^4 d}+\frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3856
Rule 3872
Rule 3934
Rule 4189
Rule 4191
Rubi steps \begin{align*} \text {integral}& = \frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 \int \frac {\frac {5}{2} (A b-a B)-\frac {1}{2} a (3 A+5 C) \sec (c+d x)-\frac {3}{2} A b \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x) (a+b \sec (c+d x))} \, dx}{5 a} \\ & = \frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}}+\frac {4 \int \frac {\frac {3}{4} \left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right )+\frac {1}{4} a (4 A b+5 a B) \sec (c+d x)-\frac {5}{4} b (A b-a B) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx}{15 a^2} \\ & = \frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}}+\frac {4 \int \frac {\frac {3}{4} a \left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right )-\left (-\frac {1}{4} a^2 (4 A b+5 a B)+\frac {3}{4} b \left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right )\right ) \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx}{15 a^4}+\frac {\left (b^2 \left (A b^2-a (b B-a C)\right )\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x)}{a+b \sec (c+d x)} \, dx}{a^4} \\ & = \frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}}-\frac {\left (3 A b^3-a^3 B-3 a b^2 B+a^2 b (A+3 C)\right ) \int \sqrt {\sec (c+d x)} \, dx}{3 a^4}+\frac {\left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx}{5 a^3}+\frac {\left (b^2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a^4} \\ & = \frac {2 b^2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^4 (a+b) d}+\frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}}-\frac {\left (\left (3 A b^3-a^3 B-3 a b^2 B+a^2 b (A+3 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{3 a^4}+\frac {\left (\left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{5 a^3} \\ & = \frac {2 \left (5 A b^2-5 a b B+a^2 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 a^3 d}-\frac {2 \left (3 A b^3-a^3 B-3 a b^2 B+a^2 b (A+3 C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 a^4 d}+\frac {2 b^2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^4 (a+b) d}+\frac {2 A \sin (c+d x)}{5 a d \sec ^{\frac {3}{2}}(c+d x)}-\frac {2 (A b-a B) \sin (c+d x)}{3 a^2 d \sqrt {\sec (c+d x)}} \\ \end{align*}
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(800\) vs. \(2(323)=646\).
Time = 2.52 (sec) , antiderivative size = 801, normalized size of antiderivative = 2.98
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int \frac {A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right ) \sec ^{\frac {5}{2}}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \]
[In]
[Out]